The present invention relates to a distance measuring apparatus and method for measuring a measurement object time representing a duration from a measurement start time to an input of measurement object pulse, and also relates to a distance measuring apparatus and method for measuring a distance from the time measuring apparatus to a measurement object.
A spectrum spread type distance measuring apparatus, which measures a distance based on a pseudo-random noise code (hereinafter, abbreviated as PN code) such as a M-sequences code, is conventionally known and used in an automotive vehicle to measure a distance from this vehicle to a preceding vehicle (i.e., an object or obstacle ahead of this vehicle).
This kind of distance measuring apparatus is characterized in that an electromagnetic wave is amplitude modulated based on a PN code having a predetermined bit length and is transmitted to a measurement object. The distance measuring apparatus receives a reflection wave of the transmitted electromagnetic wave reflected by the measurement object and demodulates a binary signal corresponding to the PN code. The distance measuring apparatus obtains a correlation value between the demodulated binary signal and the PN code, and detects a specific time at which the correlation value is maximized. Then, the distance measuring apparatus detects a duration (i.e., time interval) required for the electromagnetic wave to trip (i.e., go and return) between the distance measuring apparatus and the measurement object, and finally calculates a distance based on the detected trip time and the speed of electromagnetic wave (3xc3x97105 km/sec).
However, according to the spectrum spread type distance measuring apparatus, the time resolution in the measurement of the trip time is substantially limited by a transmission clock (hereinafter, referred to as reference clock) used in the modulation of electromagnetic wave according to the PN code. For example, the time resolution corresponding to the clock frequency of 20 MHz is 50 nsec (=1 [sec]/20xc3x97106). The corresponding measurable distance resolution is thus limited to 7.5 m (=3xc3x97108 [m/sec]xc3x9750xc3x9710xe2x88x929 [sec]/2).
To improve the measurable distance resolution in the spectrum spread type distance measuring apparatus, the unexamined Japanese patent publication No. 2000-121726 proposes to transmit and receive one additional pulse of electromagnetic wave and measures an error component of the trip time by using a gate delay time of a gate circuit which has a high resolution equivalent to several nsec or less, thereby correcting the trip time based on a detected error component.
However, the above-described technique takes a relatively long time to accomplish one complete time measurement operation because it is necessary to separately perform two stages of measurements, i.e., a coarse measurement based on the reference clock (having a low resolution) and a fine measurement based on the gate delay time (having a high resolution).
Furthermore, the electromagnetic wave used in the distance measuring apparatus is a laser beam which is emitted from a laser diode. So frequently actuating or driving the laser diode will lead to a large amount of heat generation and deteriorate the laser diode.
In view of the foregoing problems of the prior art, the present invention has an object to provide a time measuring apparatus and method capable of measuring a duration from a measurement start time to an input time of measurement object pulse within a short period of time by simultaneously performing a coarse measurement based on a reference clock and a fine measurement based on a shorter reference time (e.g., a gate delay time).
Furthermore, the present invention has an object to provide a distance measuring apparatus incorporating the time measuring apparatus as well as a distance measuring method incorporating the time measuring method.
To accomplish the above and other related objects, the present invention provides a time measuring apparatus which comprises first reference clock generating means for generating a first reference clock at predetermined periods and coarse measuring means for measuring an approximate measurement object time based on the first reference clock. The approximate measurement object time represents a duration from a measurement start time to an input time of measurement object pulse. This apparatus is characterized by fine measuring means which cooperates with the coarse measuring means and uses a reference time of predetermined periods shorter than those of the first reference clock, for measuring a time difference between a change point (e.g., a leading edge or a trailing edge) of the first reference clock and the input time of measurement object pulse as a correction time of the approximate measurement object time. A precise measurement objet time is obtained based on the approximate measurement object time measured by the coarse measuring means and the correction time measured by the fine measuring means.
Meanwhile, the present invention provides a time measuring method comprising the steps of generating a first reference clock at predetermined periods, and measuring an approximate measurement object time based on the first reference clock, the approximate measurement object time representing a duration from a measurement start time to an input time of measurement object pulse. This method is characterized by the steps of measuring a time difference between a change point of the first reference clock and the input time of measurement object pulse as a correction time of the approximate measurement object time by using a reference time of predetermined periods shorter than those of the first reference clock, and obtaining a precise measurement objet time based on the approximate measurement object time and the correction time.
According to the time measuring apparatus and method of this invention, it becomes possible to simultaneously perform the coarse measurement using the first reference clock and the fine measurement using the shorter reference time. Thus, an accurate time measurement using the coarse measuring means and the fine measuring means can be accomplished within a short time.
Accordingly, when the time measuring apparatus or method of this invention is incorporated into a distance measuring apparatus or method, the laser diode emitting an electromagnetic wave for distance measurement will not be activated so frequently and therefore the laser diode will not be deteriorated hardly due to generated heat.
The time difference measured by the coarse measuring means is a duration from a change point (e.g., a leading edge or a trailing edge) of the first reference clock to the input time of measurement object pulse. The change point of the first reference clock can be arbitrarily set.
If the time difference measured by the coarse measuring means exceeds one period of the first reference clock, it will be necessary to reduce one period of the first reference clock when obtaining the correction time.
Accordingly, it is preferable that the time difference is measured based on a change point of the first reference clock closest to the input time of measurement object pulse.
The measured time difference can be directly used as the correction time of the approximate measurement object time. The calculating operation can be simplified.
It is also preferable that the reference time used to measure the time difference is a gate delay time of a gate circuit (more specifically, a delay time of a signal inherently caused when passing an inverter, an OR gate, an AND gate, or any other gate circuit) or a comparable short time.
The gate delay time of a gate circuit is dependent on performance characteristics of semiconductor elements constituting the gate circuit and is a very short time in the level of several nsec or less. Thus, using the gate delay time can realize a very accurate measurement of the time difference.
When the time measuring apparatus or method of this invention is incorporated into the above-described spectrum spread type distance measuring apparatus, it is preferable that a pulse train generated in accordance with a pseudo-random noise code is entered in synchronism with the first reference clock, the pulse train serving as the measurement object pulse. The input time of measurement object pulse is obtained based on a correlation value between the input pulse train and the pseudo-random noise code.
It is preferable to measure a time difference between a change point of the first reference clock and a change point of at least one pulse signal of the pulse train as the correction time of the approximate measurement object time.
In performing a spectrum spread type coarse measurement, the thus arranged coarse measuring means or the coarse measuring step makes it possible to accurately measure the measurement object time without receiving adverse influence of noise. This leads to improvement in the time resolution of finally obtained measurement time.
It is possible to measure the time difference between a change point of the first reference clock and a change point of only one pulse signal of the pulse train as the correction time of the approximate measurement object time.
However, regarding the pulse train produced in accordance with a PN code, a change point of each pulse signal is always unstable with respect to a change point of the first reference clock. Thus, the time difference between a change point of the first reference clock and a change point of a pulse signal fluctuates depending on circuit characteristics used in transmitting and receiving the pulse train or depending on environmental changes of a signal transmission path. This kind of fluctuation is called as jitter.
To suppress the adverse influence of jitter, it is preferable to successively measure each time difference between a change point of the first reference clock and a change point of each pulse signal of the pulse train, and obtain an average value of thus measured time differences as the correction time.
In this case, it is preferable to measure the time difference for each pulse signal of the pulse train based on a change point of the first reference clock closest to the change point of the pulse signal.
According to this apparatus or method, the time difference of each pulse signal is always shorter than one period of the first reference clock. Furthermore, the number of time counters required for measuring the time difference can be reduced to only one.
To this end, it is preferable that the fine measuring means comprises timer means for successively measuring a duration from a common reference time to a change point of each pulse signal of the pulse train and a duration from the common reference time to a change point of the first reference clock, and the fine measuring means calculates a time difference between neighboring change points of the pulse signal and the first reference clock based on measurement result by said timer means.
According to this arrangement, the timer means starts its counting operation from the common reference time and successively measures a count time in response to each change point of a signal to be measured. Thus, the time of each change point can be simply and accurately obtained without repetitively starting and stopping the timer means. Two change points used in calculating the time difference can be easily identified.
To count the gate delay time of a gate circuit, it is possible to use a time A/D conversion circuit disclosed in unexamined Japanese patent publication No. 3-220814.
The time A/D conversion circuit comprises a ring delay pulse generating circuit (i.e., so-called ring delay line, abbreviated as RGD hereinafter) which is constituted by a plurality of gate circuits (NAND circuits and/or inverters each having a constant gate delay time) connected in a ring pattern to circulate an input pulse in this circuit. A pulse selector detects the position of a pulse signal circulating in the RGD. An encoder converts the circulating position of the pulse signal detected by the pulse selector into digital data. A counter counts the frequency (i.e., the number of times) of revolutions of a pulse signal circulating in RGD, and produces an upper-bit data corresponding to the digital data (i.e., lower-bit data) obtained by the encoder. Accordingly, the time AID conversion circuit is a preferable timer means which counts the gate delay time (i.e., the reference time).
When the fine measuring means measures the time difference between a change point of each pulse signal of a pulse train and a change point of the first reference clock, each measured time difference deviates with respect to a true value. The distribution of time differences is a reverse V shape symmetrically spreading about the true value. The time difference offset far from the true value possibly includes a large error.
Accordingly, it is preferable to judge a distribution of change points of respective pulse signals of the pulse train in one period of the first reference clock and identify unnecessary pulse signals with reference to the distribution, and exclude time differences calculated based on unnecessary pulse signals from calculation of the average value.
With this arrangement or step, the correction time can be adequately calculated and accurate measurement of the measurement object time can be realized.
To judge the distribution of change points of respective pulse signals of the pulse train and identify the pulse signals unnecessary for the average value calculation, it is preferable to count the number of change points of respective pulse signals belonging to each of time-divisional areas constituting one period of the first reference clock, and identify the unnecessary pulse signals which belong to an area having a small count number.
More specifically, the fine measuring means comprises counting means for counting the number of change points of respective pulse signals belonging to each of four time-divisional areas constituting one period of the first reference clock. The fine measuring means calculates a difference xcex9412 representing a difference between a count value of 1stMIN area and a count value of 2ndMIN area as well as a difference xcex9423 representing a difference between a count value of 2ndMIN area and a count value of 3rdMIN area based on the count result of the counting means, wherein 1stMIN area has a smallest count value, 2ndMIN area has a next smallest count value, and 3rdMIN area has a third smallest count value.
The fine measuring means identifies the unnecessary pulses whose change points belong to the 1stMIN area when the difference xcex9412 is larger than the difference xcex9423, or identifies the unnecessary pulses whose change points belong to the 1stMIN area and the 2ndMIN area when the difference xcex9412 is smaller than the difference xcex9423, or identifies the unnecessary pulses whose change points belong to the 1stMIN area, the 2ndMIN area, and 3rdMIN area when the difference xcex9412 is equal to the difference xcex9423.
More specifically, when xcex9412 greater than xcex9423, it is assumed that the number of change points of pulse signals belonging to 1stMIN area is extremely small compared with the number of change points of pulse signals belonging to other area. It is thus believed that many of change points of pulse signals spread in a wide range from 2ndMIN area to MAX area. And, it is concluded that the pulse signals having change points belonging to 1stMIN area are unnecessary for the average value calculation.
Furthermore, when xcex9412 less than xcex9423, it is assumed that the number of change points of pulse signals belonging to 1stMIN area and 2ndMIN area is extremely small compared with the number of change points of pulse signals belonging to 3rdMIN area. It is thus believed that many of change points of pulse signals spread in a range from 3rdMIN area to MAX area. And, it is concluded that the pulse signals having change points belonging to 1stMIN area and 2ndMIN area are unnecessary for the average value calculation.
Furthermore, when xcex9412=xcex9423, it is believed that many of change points of pulse signals reside in MAX area. Thus, it is concluded that the pulse signals having change points belonging to 1stMIN area, 2ndMIN area, and 3rdMIN area are unnecessary for the average value calculation.
With this arrangement or step, the correction time of the approximate measurement object time can be accurately measured.
In this case, it is further preferable that to invalidate all of calculated time differences and prohibit the calculation of the average value when the 3rdMIN area and MAX area are consecutive (i.e., neighboring) areas positioned before and after a change point of the reference clock used in the measurement of the time difference, wherein the MAX area has a largest count value.
When the 3rdMIN area and MAX area are consecutive (i.e., neighboring) areas positioned before and after a change point of the reference clock used in the measurement of the time difference, the reference clock used for obtaining the time differences of 3rdMIN area is different from the reference clock used for obtaining the time differences of MAX area. Thus, it is not preferable to calculate an average of the time differences obtained based on different reference clocks.
Furthermore, it is preferable that the time measuring apparatus further comprises second reference clock generating means for generating a second reference clock having a phase difference of 180 degrees with respect to the first reference clock. The fine measuring means comprises first fine measuring means for obtaining a first correction time which is an average time difference between a change point of each pulse signal and a change point of the first reference clock, second fine measuring means for obtaining a second correction time which is an average time difference between a change point of each pulse signal and a change point of the second reference clock, and correction time selecting means for judging whether a distribution of change points of respective pulses is closer to the change point of the first reference clock or closer to the change point of the second reference clock, and selecting the first correction time when the distribution of change points of respective pulses is closer to the change point of the second reference clock or selecting the second correction time when the distribution of change points of respective pulses is closer to the change point of the first reference clock.
With this arrangement, the fine measuring means can select a reliable correction time and appropriately correct the approximate measurement object time based on the selected reliable correction time.
According to this arrangement, the fine measuring means selects the second correction time when the distribution of change points of respective pulses is closer to the change point of the first reference clock. In this case, if the second correction time is directly used for correcting the approximate measurement object time measured based on the first reference clock by the coarse measuring means, the obtained result will deviate from an inherent value by an amount equivalent to a half period of the first reference clock.
Accordingly, when the second correction time is selected, it is necessary to add (or subtract) the time equivalent to a half period of the first reference clock to (or from) the corrected measurement object time.
The reference clock (i.e., second reference clock) used in the second fine measuring means is different from the reference clock (i.e., first reference clock) used in the first fine measuring means. In obtaining the measurement object time, the measuring accuracy may be lowered due to a variation of phase difference between the first reference clock and the second reference clock.
Hence, it is preferable that the coarse measuring means comprises first coarse measuring means for inputting the pulse train in synchronism with the first reference clock and measuring the approximate measurement object time based on a correlation value between the pulse train and the pseudo-random noise code, second coarse measuring means for inputting the pulse train in synchronism with the second reference clock and measuring the approximate measurement object time based on a correlation value between the pulse train and the pseudo-random noise code, and measurement time selecting means for selecting the approximate measurement object time of the first coarse measuring means when the correction time selecting means of the fine measuring means selects the first correction time or selecting the approximate measurement object time of the second coarse measuring means when the correction time selecting means of the fine measuring means selects the second correction time.
This arrangement always assures that the approximate measurement object time of the coarse measuring means and the correction time of the fine measuring means are obtained based on the same reference clock. Thus, it becomes possible to surely prevent the measuring accuracy from being lowered due to a variation of phase difference between two kinds of reference clocks.
When the fine measuring means is constituted by the first measuring means and the second measuring means, it is necessary to select one of two kinds of correction times. Therefore, it is preferable that the correction time selecting means is associated with counting means which counts the number of change points of respective pulse signals belonging to each of four time-divisional areas constituting one period of the first reference clock. The correction time selecting means compares the number of change points belonging to two consecutive areas positioned before and after the change point of the first reference clock with the number of change points belonging to two consecutive areas positioned before and after the change point of the second reference clock to identify one of the first and second reference clocks as having smaller change points, and selects the correction time measured based on the identified reference clock.
With this arrangement, the correction time selecting means can simply and surely select a reliable correction time for the approximate measurement object time obtained in the coarse measuring means.
In this case, it is preferable that the counting means uses the first reference clock, a first auxiliary clock having a phase difference of 90 degrees with respect to the first reference clock, the second reference clock having a phase difference of 180 degrees with respect to the first reference clock, and a second auxiliary clock having a phase difference of 270 degrees with respect to the first reference clock. The counting means identifies an area to which a change point of each pulse signal belongs based on a signal level of each clock at a change point of each pulse signal.
With this arrangement, in identifying the area to which a change point of each pulse signal belongs, the counting means can use a combination of signal levels of four kinds of clocks (i.e., a 4-bit data consisting of high or low data). Thus, the arrangement of the counting means can be simplified.
Meanwhile, the present invention provides a spectrum spread type distance measuring apparatus comprising pulse train generating means for generating a pulse train corresponding to a pseudo-random noise code having a predetermined bit length in synchronism with a reference clock, transmitting means for transmitting an electromagnetic wave modulated based on the pulse train generated by the pulse train generating means, receiving means for receiving a reflection wave reflected by a measurement object after the electromagnetic wave is transmitted from the transmitting means and for restoring the pulse train, time measuring means for measuring a measurement object time based on the pulse train restored by the receiving means and the pseudo-random noise code, the measurement object time representing a duration from transmission of the electromagnetic wave to reception of the reflection wave, and means for detecting a distance from the distance measuring apparatus to the measurement object based on the measurement object time measured by the time measuring means, wherein the time measuring means is the above-described time measuring apparatus of the present invention. Similarly, the time measuring method of the present invention is applicable to the spectrum spread type distance measuring apparatus.
According to this spectrum spread type distance measuring apparatus or method, the measurable distance resolution can be improved.
The spectrum spread type distance measuring apparatus of this invention can be preferably used as an obstacle detecting apparatus or an automatic tracking radar apparatus which is usually mounted on an automotive vehicle or a comparable mobile device and required to speedily and accurately detect the distance of an object (e.g., preceding vehicle) ahead of this vehicle.
In the spectrum spread type distance measuring apparatus, the receiving means is usually equipped with an antenna or a light-receiving element for receiving a reflection wave returning from a measurement object. By judging the magnitude of a received signal, the receiving means restores a pulse signal corresponding to a PN code. However, the level of a receiving signal is unstable immediately after starting the reception of a reflection wave. The pulse signal cannot be restored accurately.
If the pulse signal is not restored accurately and the pulse width of a restored pulse train does not correspond to the period of a reference clock, the time difference measured by the fine measuring means will largely deviate from a true value. It will be difficult to accurately correct the measurement object time.
Accordingly, it is preferable that the pulse train generating means generates surplus pulse signals for a predetermined time until an output of the receiving means is stabilized after the receiving means starts receiving the reflection wave, and then generates the pulse train corresponding to the pseudo-random noise code having a predetermined bit length in synchronism with a reference clock. And, the time measuring means starts time measurement after the predetermined time has elapsed after the transmitting means starts transmission of the electromagnetic wave based on the pulse signal generated by the pulse train generating means.
With this arrangement, the coarse measuring means and the fine measuring means can start the time measuring operation after the operation of the receiving means is stabilized adequately.